package leetCode.solution;

public class Solution179 {

	public static void main(String[] args) {
		System.out.println(new Solution179().hammingWeight(5));
	}
	public int hammingWeight(int n) {
        int a = 0;
        for(int i =1;i<=32;i++) {
        	if((n & 1) ==1) a++;
        	n = n>>>1;
        }
		return a;
    }
}
